﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FloodFree.Common;

namespace FloodFree.Web.ViewModels
{
    
    public class CityAddViewModel
    {
        private FloodFreeContext db = new FloodFreeContext();
        public City City { get; set; }
        public List<State> States { get{ return db.States.ToList(); }}
        public CityAddViewModel()
        {
            this.City = new City();
        }

        public CityAddViewModel(int id)
        {
            City = db.Cities.Where(e => e.Id == id).SingleOrDefault();
        }


    }
}